home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update27.zoo / gcc-233 / Makefile.minix < prev    next >
Encoding:
Makefile  |  1992-12-28  |  11.1 KB  |  328 lines

  1. # Makefile for GNU C compiler.
  2. #   Copyright (C) 1987 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU CC.
  5.  
  6. #GNU CC is distributed in the hope that it will be useful,
  7. #but WITHOUT ANY WARRANTY.  No author or distributor
  8. #accepts responsibility to anyone for the consequences of using it
  9. #or for whether it serves any particular purpose or works at all,
  10. #unless he says so in writing.  Refer to the GNU CC General Public
  11. #License for full details.
  12.  
  13. #Everyone is granted permission to copy, modify and redistribute
  14. #GNU CC, but only under the conditions described in the
  15. #GNU CC General Public License.   A copy of this license is
  16. #supposed to have been given to you along with GNU CC so you
  17. #can know your rights and responsibilities.  It should be in a
  18. #file named COPYING.  Among other things, the copyright notice
  19. #and this notice must be preserved on all copies.
  20.  
  21. CROSSDIR = /net/acae127/home/bammi/atari/cross-minix
  22. CROSSBIN = $(CROSSDIR)/bin
  23. CROSSLIB = $(CROSSDIR)/lib
  24. CROSSINC = $(CROSSDIR)/include
  25. GCC_INCLUDE_DIR = $(CROSSINC)
  26. GPLUSPLUS_INCLUDE_DIR = $(CROSSDIR)/g++-inc
  27.  
  28. CFLAGS = -g -O -DCROSSATARI=1 -DMINIX -I./config -I.
  29. # hosts gcc
  30. CC = /util/gnu/bin/gcc
  31.  
  32. # OLDCC should not be the GNU C compiler.
  33. OLDCC = cc
  34. BISON = bison
  35. AR = ar
  36. SHELL = /bin/sh
  37.  
  38. bindir = $(CROSSBIN)
  39. libdir = $(CROSSLIB)
  40.  
  41. # These are what you would need on HPUX:
  42. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  43. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  44. # bites whenever tree.def, rtl.def or machmode.def is included
  45. # (ie., on every source file).
  46. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  47. # For CCLIBFLAGS you might want to specify the switch that
  48. # forces only 68000 instructions to be used.
  49.  
  50. # If you are making gcc for the first time, and if you are compiling it with
  51. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  52. # of the standard libraries (as is true for HP/UX or Genix),
  53. # then get alloca.c from GNU Emacs and un-comment the following line:
  54. # ALLOCA = alloca.o
  55.  
  56. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  57. # CLIB= -lPW
  58.   
  59. # If your system's malloc() routine fails for any reason (as it does on
  60. # certain versions of Genix), try getting the files
  61. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  62. # MALLOC = malloc.o
  63.  
  64. # If you are running GCC on an Apollo, you will need this:
  65. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  66.  
  67. # Change this to a null string if obstacks are installed in the
  68. # system library.
  69. OBSTACK=obstack.o
  70.  
  71. # Dependency on obstack, alloca, malloc or whatever library facilities
  72. # are not installed in the system libraries.
  73. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  74.  
  75. # How to link with both our special library facilities
  76. # and the system's installed libraries.
  77. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  78.  
  79. DIR = ../gcc
  80.  
  81. # Object files of CC1.
  82. OBJS = toplev.o version.o c-parse.tab.o tree.o print-tree.o \
  83.  c-decl.o c-typeck.o c-convert.o stor-layout.o fold-const.o \
  84.  rtl.o rtlanal.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
  85.  symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
  86.  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
  87.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  88.  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
  89.  
  90. # Files to be copied away after each stage in building.
  91. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  92.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  93.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  94.  cc1 cpp cccp # cc1plus
  95.  
  96. # Header files that are made available to programs compiled with gcc.
  97. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  98.  
  99. # If you want to recompile everything, just do rm *.o.
  100. # CONFIG_H = config.h tm.h
  101. CONFIG_H =
  102. RTL_H = rtl.h rtl.def machmode.def
  103. TREE_H = tree.h real.h tree.def machmode.def
  104.  
  105. ALL =  gcc cc1 cpp
  106.  
  107. all: $(ALL)
  108.  
  109. compilations: ${OBJS}
  110.  
  111. gcc: gcc.o version.o $(LIBDEPS)
  112.     $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
  113. # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
  114.     mv gccnew gcc
  115.  
  116. gcc.o: gcc.c $(CONFIG_H)
  117.     $(CC) $(CFLAGS) -c -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" gcc.c
  118.  
  119. cc1: $(OBJS) $(LIBDEPS)
  120.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(OBJS) $(LIBS)
  121.  
  122. # C-language specific files.
  123.  
  124. c-parse.tab.o : c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h
  125. c-parse.tab.c : c-parse.y
  126.     $(BISON) -v c-parse.y
  127.  
  128. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
  129. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  130. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
  131.  
  132. # Language-independent files.
  133.  
  134. tree.o : tree.c $(CONFIG_H) $(TREE_H)
  135. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  136. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H)
  137. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
  138. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h
  139.  
  140. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  141.  
  142. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  143.  
  144. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h insn-codes.h
  145. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  146.    insn-flags.h expr.h insn-config.h regs.h insn-codes.h
  147. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  148.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  149. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  150.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  151. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
  152. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  153.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  154. symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
  155. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h
  156. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h
  157.  
  158. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h
  159.  
  160. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
  161.    insn-flags.h insn-codes.h
  162.  
  163. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
  164. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
  165.  
  166. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  167. loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h recog.h
  168. flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
  169. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  170.    insn-config.h regs.h basic-block.h recog.h
  171. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
  172.    insn-config.h recog.h hard-reg-set.h
  173. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
  174.    insn-config.h recog.h hard-reg-set.h
  175. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  176.    basic-block.h regs.h hard-reg-set.h insn-config.h
  177.  
  178. reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
  179.    reload.h recog.h hard-reg-set.h insn-config.h regs.h
  180. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
  181.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
  182. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  183.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  184. final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h \
  185.    insn-config.h
  186. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  187.    regs.h recog.h hard-reg-set.h insn-config.h
  188.  
  189. # Now the source files that are generated from the machine description.
  190.  
  191. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  192.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
  193.  
  194. insn-config.h : md genconfig
  195.     ./genconfig md > tmp-insn-config.h
  196.     ./move-if-change tmp-insn-config.h insn-config.h
  197.  
  198. insn-flags.h : md genflags
  199.     ./genflags md > tmp-insn-flags.h
  200.     ./move-if-change tmp-insn-flags.h insn-flags.h
  201.  
  202. insn-codes.h : md gencodes
  203.     ./gencodes md > tmp-insn-codes.h
  204.     ./move-if-change tmp-insn-codes.h insn-codes.h
  205.  
  206. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  207.     $(CC) $(CFLAGS) -c insn-emit.c
  208.  
  209. insn-emit.c : md genemit
  210.     ./genemit md > tmp-insn-emit.c
  211.     ./move-if-change tmp-insn-emit.c insn-emit.c
  212.  
  213. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  214.     $(CC) $(CFLAGS) -c insn-recog.c
  215.  
  216. insn-recog.c : md genrecog
  217.     ./genrecog md > tmp-insn-recog.c
  218.     ./move-if-change tmp-insn-recog.c insn-recog.c
  219.  
  220. insn-extract.o : insn-extract.c $(RTL_H)
  221.     $(CC) $(CFLAGS) -c insn-extract.c
  222.  
  223. insn-extract.c : md genextract
  224.     ./genextract md > tmp-insn-extract.c
  225.     ./move-if-change tmp-insn-extract.c insn-extract.c
  226.  
  227. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  228.     $(CC) $(CFLAGS) -c insn-peep.c
  229.  
  230. insn-peep.c : md genpeep
  231.     ./genpeep md > tmp-insn-peep.c
  232.     ./move-if-change tmp-insn-peep.c insn-peep.c
  233.  
  234. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  235.     $(CC) $(CFLAGS) -c insn-output.c
  236.  
  237. insn-output.c : md genoutput
  238.     ./genoutput md > tmp-insn-output.c
  239.     ./move-if-change tmp-insn-output.c insn-output.c
  240.  
  241. # Now the programs that generate those files.
  242.  
  243. genconfig : genconfig.o rtl.o $(LIBDEPS)
  244.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  245.  
  246. genconfig.o : genconfig.c $(RTL_H)
  247.     $(CC) $(CFLAGS) -c genconfig.c
  248.  
  249. genflags : genflags.o rtl.o $(LIBDEPS)
  250.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  251.  
  252. genflags.o : genflags.c $(RTL_H)
  253.     $(CC) $(CFLAGS) -c genflags.c
  254.  
  255. gencodes : gencodes.o rtl.o $(LIBDEPS)
  256.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  257.  
  258. gencodes.o : gencodes.c $(RTL_H)
  259.     $(CC) $(CFLAGS) -c gencodes.c
  260.  
  261. genemit : genemit.o rtl.o $(LIBDEPS)
  262.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  263.  
  264. genemit.o : genemit.c $(RTL_H)
  265.     $(CC) $(CFLAGS) -c genemit.c
  266.  
  267. genrecog : genrecog.o rtl.o $(LIBDEPS)
  268.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  269.  
  270. genrecog.o : genrecog.c $(RTL_H)
  271.     $(CC) $(CFLAGS) -c genrecog.c
  272.  
  273. genextract : genextract.o rtl.o $(LIBDEPS)
  274.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  275.  
  276. genextract.o : genextract.c $(RTL_H)
  277.     $(CC) $(CFLAGS) -c genextract.c
  278.  
  279. genpeep : genpeep.o rtl.o $(LIBDEPS)
  280.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  281.  
  282. genpeep.o : genpeep.c $(RTL_H)
  283.     $(CC) $(CFLAGS) -c genpeep.c
  284.  
  285. genoutput : genoutput.o rtl.o $(LIBDEPS)
  286.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  287.  
  288. genoutput.o : genoutput.c $(RTL_H)
  289.     $(CC) $(CFLAGS) -c genoutput.c
  290.  
  291. # Making the preprocessor
  292. cpp: cccp
  293.     -rm -f cpp
  294.     ln cccp cpp
  295. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  296.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  297. cexp.o: cexp.c
  298. cexp.c: cexp.y
  299.     $(BISON) cexp.y
  300.     mv cexp.tab.c cexp.c
  301. cccp.o: cccp.c
  302.     $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(GCC_INCLUDE_DIR)\" \
  303.           -DGPLUSPLUS_INCLUDE_DIR=\"$(GPLUSPLUS_INCLUDE_DIR)\" \
  304.       -DCROSSINC=\"$(CROSSINC)\" -c cccp.c
  305.  
  306. # gnulib is not deleted because deleting it would be inconvenient
  307. # for most uses of this target.
  308. clean:
  309.     -rm -f *.o *.oo $(ALL) $(STAGESTUFF)
  310.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  311.     -rm -f core
  312.  
  313. # Get rid of every file that's generated from some other file (except INSTALL).
  314. realclean: clean
  315.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  316.     -rm -f errs gnulib TAGS 
  317.  
  318. # Copy the files into directories where they will be run.
  319. install: all
  320.     install cc1 $(libdir)/gcc-cc1
  321.     install cpp $(libdir)/gcc-cpp
  322.     install gcc $(bindir)/mgcc
  323.  
  324. force:
  325.  
  326. #In GNU Make, ignore whether `stage*' exists.
  327. .PHONY: clean realclean
  328.